<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <h2 class="sub-header">新增标签</h2>
    <div class="table-responsive">
        <form #f="ngForm" (ngSubmit)="addHandle(f)">
            <div [ngClass]="['form-group',tagName==''?'has-error':'']">
                <label for="tag">标签名称</label>
                <!-- [ngModelOptions]="{standalone: true}" 将表单控件的数据模型单独出来独立使用  -->
                <input required autofocus [(ngModel)]="tagName" [ngModelOptions]="{standalone: true}" type="text" [ngClass]="['form-control']" id="tag" placeholder="标签名称">
            </div>
            <button type="submit" class="btn btn-info">创建</button>
        </form>
    </div>
</div>